using Fusion.Frameworks.Editor;
using UnityEditor;

namespace Fusion.Hotfix.Editor
{

    [InitializeOnLoad]
    public static class BuildActionRegister
    {
        static BuildActionRegister()
        {
            BuilderCallback.OnBuildPlayerBefore = OnBuildPlayerBefore;
            BuilderCallback.OnBuildPlayerAfter = OnBuildPlayerAfter;
        }

        public static void OnBuildPlayerBefore()
        {
            DLLPacker.BackupCSharp();
        }

        public static void OnBuildPlayerAfter()
        {
            DLLPacker.RecoverCSharp();
        }
    }

}

